home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
hl.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-09-26
|
3KB
|
94 lines
/* ******************************************************************* */
/* ** ** */
/* ** ATKeyboard Utility Help ** */
/* ** Copright (C) 1992-1993 by Thomas Dreibholz ** */
/* ** All rights reserved ** */
/* ** ** */
/* ******************************************************************* */
#include <exec/types.h>
#include <intuition/intuition.h>
struct ATUtilitiesBase *ATUtilitiesBase;
struct GfxBase *GfxBase;
VOID main(argc,argv)
LONG argc;
UBYTE *argv[];
{
REGISTER BOOL ende;
REGISTER UBYTE *name;
REGISTER ULONG Class;
register struct Gadget *gad;
register struct Window *win;
register struct RastPort *rp;
register struct TextFont *opal;
register struct IntuiMessage *msg;
GfxBase=OpenLibrary("graphics.library",0);
if(GfxBase==NULL) exit(0);
ATUtilitiesBase=OpenLibrary("at-utilities.library",0L);
if(ATUtilitiesBase!=NULL)
{
win=CreateStdWindow("Hilfedatei laden",75,75,450,75,CLOSEWINDOW|GADGETUP,
ACTIVATE|WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG);
if(win!=NULL)
{
rp=win->RPort;
opal=GetOpalFont();
if(opal) SetFont(rp,opal);
SelectStdFPen(rp);
WriteText(rp,15,20,"Bitte geben Sie hier den Namen der Hilfedatei");
WriteText(rp,15,30,"an. Klicken Sie danach auf \"Lade Hilfedatei\".");
if(argc>1) name=argv[0]; else name="SYS:PC/ATUtilities/Help/ATKeyboard.help";
name=CreateStringGadget(win,15,40,410,10,name,256,0);
CreateBoolGadget(win,15,55,200,12,"Lade Hilfedatei",1);
CreateBoolGadget(win,225,55,200,12,"Information",2);
ende=FALSE;
while(ende==FALSE)
{
WaitPort(win->UserPort);
msg=GetMsg(win->UserPort);
Class=msg->Class;
gad=msg->IAddress;
ReplyMsg(msg);
switch(Class)
{
case GADGETUP:
switch(gad->GadgetID)
{
case 1:
Help(name,0);
break;
case 2:
InformationBox("Hilfedateien-Lader - Information",
"Hilfe-Lader - Version 1.0",
"Copyright (C) 1993 by",
"Thomas Dreibholz",
"All rights reserved.",
"SYS:PC/ATUtilities/Icons/Help");
break;
}
break;
case CLOSEWINDOW:
ende=TRUE;
break;
}
}
DeleteStdWindow(win);
if(opal) CloseFont(opal);
}
else
{
InfoRequest("Kann Fenster nicht öffnen!");
}
CloseLibrary(ATUtilitiesBase);
}
else
{
printf("FEHLER: Keine ATUtilities-Library!\n");
}
exit(0);
}